//package com.xspace.android.xafcommon.download;
//
//import com.xspace.android.xafcommon.download.IDownCallback;
//import com.xspace.android.xafcommon.download.IDownload;
//import com.xspace.android.xafcommon.util.LogUtils;
//
//import android.app.Service;
//import android.content.Intent;
//import android.os.IBinder;
//import android.os.RemoteException;
//import android.util.Log;
//
//public class DownloadService extends Service {
//    private DownloadManager mDownloadManager;
//
//    @Override
//    public void onCreate() {
//        super.onCreate();
//		LogUtils.d("downloadService  onStartCommand");
//        mDownloadManager = new DownloadManager();
//    }
//    @Override
//    public int onStartCommand(Intent intent, int flags, int startId) {
//    	Log.v("dloadservice", "onStartCommand mDownloadManager:"+mDownloadManager);
//		LogUtils.d("downloadService  onStartCommand");
//    	if(mDownloadManager==null){
//    		mDownloadManager=new DownloadManager();
//    	}
//    	return super.onStartCommand(intent, flags, startId);
//    }
//
//    @Override
//    public IBinder onBind(Intent arg0) {
//		LogUtils.d("downloadService  onBind");
//		return null;
//    }
//
////    private IDownload.Stub mBinder = new IDownload.Stub() {
////
////		@Override
////		public void resume(String id) throws RemoteException {
////			mDownloadManager.resume(id);
////		}
////
////		@Override
////		public void resetCallback(String id, IDownCallback callback)
////				throws RemoteException {
////			mDownloadManager.setCallback(id, callback);
////		}
////
////		@Override
////		public void pause(String id) throws RemoteException {
////			mDownloadManager.pause(id);
////		}
////
////		@Override
////		public int getStatus(String id) throws RemoteException {
////			return mDownloadManager.getStatus(id);
////		}
////
////		@Override
////		public float getProgress(String id) throws RemoteException {
////			return mDownloadManager.getProgress(id);
////		}
////
////		@Override
////		public long getDowned(String id) throws RemoteException {
////			return mDownloadManager.getDowned(id);
////		}
////
////		@Override
////		public void downMap(DownloadInfo downloads, String id,String serviceName, boolean type,
////				IDownCallback callback) throws RemoteException {
////			LogUtils.d("downloadService  downMap");
////			mDownloadManager.addTask(id, downloads, serviceName, type, callback);
////		}
////
////		@Override
////		public void cancel(String id) throws RemoteException {
////			mDownloadManager.cancel(id);
////		}
////	};
//}
